package com.xbongbong.pro.statistic.result.pojo;

import com.xbongbong.paas.constant.PaasConstant;
import com.xbongbong.saas.constant.BasicConstant;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * 首次成交、再次成交pojo
 * @author zcp
 * @version v1.0
 * @date 2019/2/22 20:28
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class CustomerOkFirstSecondPojo implements Serializable {
    private static final long serialVersionUID = 3640543223847300448L;

    /**
     * 首次成交总数
     */
    private int firstTotal;
    /**
     * 再次成交总数
     */
    private int secondTotal;
    /**
     * 各个桶内，首次成交list
     */
    private List<Integer> firstResultList;
    /**
     * 各个桶内，再次成交list
     */
    private List<Integer> secondResultList;
    /**
     * 各个桶内，首次成交客户id list
     */
    private List<Set<Long>> firstCustomerIds;
    /**
     * 各个桶内，再次成交客户id list
     */
    private List<Set<Long>> secondCustomerIds;
    /**
     * （逐桶比较）总桶内，首次成交客户id 集合 -- 在当前桶首次成交，但是前面桶可能已经成交过，则无需塞入--从而减小firstCids量级
     */
    private Set<Long> firstCids;
    /**
     * （逐桶比较，部分首次成交由于与之前桶比较重复、导致归为再次成交）总桶内，再次成交客户id 集合
     */
    private Set<Long> secondCids;

    public CustomerOkFirstSecondPojo() {
        firstTotal = 0;
        secondTotal = 0;
        firstResultList = new ArrayList<>();
        secondResultList = new ArrayList<>();
        firstCustomerIds = new ArrayList<>();
        secondCustomerIds = new ArrayList<>();
        firstCids = new HashSet<>(PaasConstant.DEFAULT_INITIAL_CAPACITY);
        secondCids = new HashSet<>(PaasConstant.DEFAULT_INITIAL_CAPACITY);
    }
}
